<template>
  <Scroll :pullUpLoad="true" class="scroll" ref="scroll">
    <template>
      <div class="tabList">
        <div v-for="(item, index) in subcategory" :key="index" class="item">
          <a :href="item.link">
            <img v-lazy="item.image" width="100%" />
            <div class="title">{{ item.title }}</div>
          </a>
        </div>
      </div>
    </template>
  </Scroll>
</template>

<script>
import Scroll from '@/components/content/scroll/'
export default {
  name: 'tabList',
  components: {
    Scroll,
  },
  data() {
    return {}
  },
  props: {
    subcategory: {
      type: Array,
      default() {
        return []
      },
    },
  },
  updated() {
    this.$refs.scroll.refresh()
  },
}
</script>
<style scoped>
.scroll {
  height: calc(100vh - 88px);
}
.tabList {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px;
}
.item {
  width: 30%;
  text-align: center;
  padding: 6px;
  font-size: 13px;
}
</style>
